<template>
  <!-- 详情 -->
  <Order v-if="pageType === 'detail'" />
  <!-- 编辑 -->
  <SalesMaterialManagementForm v-if="pageType === 'update'" />
</template>
<script setup lang="ts">
import SalesMaterialManagementForm from './SalesMaterialManagementForm.vue'
import Order from './order.vue'
const pageType = ref<any>('')  //detail 详情 update 编辑

/** 初始化 **/
onMounted(() => {
  const { currentRoute } = useRouter()
  pageType.value = currentRoute.value.query.type
})
</script>
